﻿Imports System.Data
Imports VSModel
Partial Class Control_Menu_HeaderMenuAdmin
    Inherits System.Web.UI.UserControl
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            If Session("UserName") = "admin" Then
                Dim lstNode As New DataSet
                lstNode.ReadXml(MapPath("../../xml/HeaderMenuAdmin.xml"))
                With rptMenu
                    .DataSource = lstNode.Tables("Node")
                    .DataBind()
                End With
            End If
            Using _data As New VSEntities
                '  Dim p = (From q 
            End Using
        End If
    End Sub
    Protected Sub rptMenu_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptMenu.ItemDataBound
        Dim hplTitle As HyperLink
        hplTitle = e.Item.FindControl("hplTitle")

        'hplTitle.NavigateUrl = DomainURL & "Page/Default.aspx?DepID=" & e.Item.DataItem("DepID").ToString
        hplTitle.NavigateUrl = e.Item.DataItem("URL").ToString
        hplTitle.Text = e.Item.DataItem("Title") 

    End Sub

End Class
